#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author   : zhongxin
# @Time     : 2022/9/1 15:05
# @File     : models.py.py
# @Project  : PyCharm
from django.db import models


class BaseModel(models.Model):
    """
    基类，公共字段
    """
    id = models.AutoField(verbose_name='id主键', primary_key=True, help_text='id主键')
    c_time = models.DateTimeField('创建时间', auto_now_add=True)
    u_time = models.DateTimeField('更新时间', auto_now=True)
    is_delete = models.BooleanField('逻辑删除', default=False)

    class Meta:
        # 抽象类，用于继承，迁移时不会创建
        abstract = True
